In [1]:
import matplotlib.pyplot as plt
import numpy as np
import os
In [2]:
plt.rcdefaults()

Varying Height

In [3]:
IMG_DIR = "extracted_images/h1_try"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 22, 50), color="red")
Out[3]:
[<matplotlib.lines.Line2D at 0x166e230f280>]
In [8]:
IMG_DIR = "extracted_images/h1"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 21.5, 50), color="red")
Out[8]:
[<matplotlib.lines.Line2D at 0x1e27fa692e0>]
In [12]:
IMG_DIR = "extracted_images/h2"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 27, 25), color="red")
Out[12]:
[<matplotlib.lines.Line2D at 0x1e27fbac040>]
In [13]:
IMG_DIR = "extracted_images/h3"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 27, 25), color="red")
Out[13]:
[<matplotlib.lines.Line2D at 0x1e27fc04b80>]
In [18]:
IMG_DIR = "extracted_images/h4"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 24.5, 40), color="red")
Out[18]:
[<matplotlib.lines.Line2D at 0x1e27fe3b160>]
In [19]:
IMG_DIR = "extracted_images/h5_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 24.5, 40), color="red")
Out[19]:
[<matplotlib.lines.Line2D at 0x1e27ffd0c10>]
In [4]:
IMG_DIR = "extracted_images/h6"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 24.5, 35), color="red")
Out[4]:
[<matplotlib.lines.Line2D at 0x166e24fd490>]
In [21]:
IMG_DIR = "extracted_images/h7"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25, 35), color="red")
Out[21]:
[<matplotlib.lines.Line2D at 0x1e20118f2b0>]
In [22]:
IMG_DIR = "extracted_images/h7_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25, 35), color="red")
Out[22]:
[<matplotlib.lines.Line2D at 0x1e201063dc0>]
In [24]:
IMG_DIR = "extracted_images/h8_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 24.5, 35), color="red")
Out[24]:
[<matplotlib.lines.Line2D at 0x1e20112e4f0>]
In [25]:
IMG_DIR = "extracted_images/h9_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25, 35), color="red")
Out[25]:
[<matplotlib.lines.Line2D at 0x1e2012fd070>]
In [26]:
IMG_DIR = "extracted_images/h10_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25, 35), color="red")
Out[26]:
[<matplotlib.lines.Line2D at 0x1e27fe0f2b0>]
In [30]:
IMG_DIR = "extracted_images/h11_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 27.5, 15), color="red")
Out[30]:
[<matplotlib.lines.Line2D at 0x1e2013b5be0>]
In [32]:
IMG_DIR = "extracted_images/h12_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 27.5, 15), color="red")
Out[32]:
[<matplotlib.lines.Line2D at 0x1e201417700>]
In [35]:
IMG_DIR = "extracted_images/h13_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 27.5, 15), color="red")
Out[35]:
[<matplotlib.lines.Line2D at 0x1e2026488b0>]
In [41]:
IMG_DIR = "extracted_images/h14_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25.5, 30), color="red")
Out[41]:
[<matplotlib.lines.Line2D at 0x1e2026e7400>]
In [44]:
IMG_DIR = "extracted_images/h15_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25.5, 30), color="red")
Out[44]:
[<matplotlib.lines.Line2D at 0x1e202878550>]
In [45]:
IMG_DIR = "extracted_images/h16_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25.5, 30), color="red")
Out[45]:
[<matplotlib.lines.Line2D at 0x1e2028da070>]
In [46]:
IMG_DIR = "extracted_images/h17_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 25.5, 30), color="red")
Out[46]:
[<matplotlib.lines.Line2D at 0x1e203a31b50>]
In [54]:
IMG_DIR = "extracted_images/h18_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 29.5, 10), color="red")
Out[54]:
[<matplotlib.lines.Line2D at 0x1e20271cdc0>]
In [55]:
IMG_DIR = "extracted_images/h19_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 29.5, 10), color="red")
Out[55]:
[<matplotlib.lines.Line2D at 0x1e2039a1580>]
In [57]:
IMG_DIR = "extracted_images/h20_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 29, 10), color="red")
Out[57]:
[<matplotlib.lines.Line2D at 0x1e203c62d00>]
In [58]:
IMG_DIR = "extracted_images/h21_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 29, 10), color="red")
Out[58]:
[<matplotlib.lines.Line2D at 0x1e203cc6850>]
In [60]:
IMG_DIR = "extracted_images/h22_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[100])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 29.5, 10), color="red")
Out[60]:
[<matplotlib.lines.Line2D at 0x1e204f4fe50>]
In [70]:
IMG_DIR = "extracted_images/h23_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[10])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[330:630, 500:900], cmap="gray")
plt.plot(X, get_line(X, 18.5, 0), color="red")
Out[70]:
[<matplotlib.lines.Line2D at 0x1e20610b1c0>]
In [78]:
IMG_DIR = "extracted_images/h24"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[10])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[330:630, 500:900], cmap="gray")
plt.plot(X, get_line(X, 20.5, 0), color="red")
Out[78]:
[<matplotlib.lines.Line2D at 0x1e2063dd820>]
In [73]:
IMG_DIR = "extracted_images/h25_short"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[10])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[330:630, 500:900], cmap="gray")
plt.plot(X, get_line(X, 19, 0), color="red")
Out[73]:
[<matplotlib.lines.Line2D at 0x1e203bbdb20>]
In [83]:
IMG_DIR = "extracted_images/ref"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[10])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 24.5, 35), color="red")
Out[83]:
[<matplotlib.lines.Line2D at 0x1e20754af70>]

Varying Angle

In [7]:
IMG_DIR = "extracted_images/theta1_bounce"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 20.5, 0), color="red");
In [8]:
IMG_DIR = "extracted_images/theta1_pass"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 20.5, 0), color="red");
In [19]:
IMG_DIR = "extracted_images/theta2_bounce"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 22, -10), color="red");
In [18]:
IMG_DIR = "extracted_images/theta2_pass"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 22.5, -10), color="red");
In [35]:
IMG_DIR = "extracted_images/theta3_bounce"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 500, 1000)

plt.imshow(sample_image[300:730, 500:1000], cmap="gray")
plt.plot(X, get_line(X, 31, 5), color="red");
In [37]:
IMG_DIR = "extracted_images/theta3_pass"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 500, 1000)

plt.imshow(sample_image[300:730, 500:1000], cmap="gray")
plt.plot(X, get_line(X, 31, -5), color="red");
In [52]:
IMG_DIR = "extracted_images/theta5_bounce1"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 52.5, 5), color="red");
In [56]:
IMG_DIR = "extracted_images/theta5_bounce2"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 50.5, 8), color="red");
In [64]:
IMG_DIR = "extracted_images/theta5_pass3"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 56.5, -5), color="red");
In [65]:
IMG_DIR = "extracted_images/theta5_pass4"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 56.5, -5), color="red");
In [68]:
IMG_DIR = "extracted_images/theta5_pass5"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 54.5, -5), color="red");
In [69]:
IMG_DIR = "extracted_images/theta5_pass6"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 54.5, -5), color="red");
In [75]:
IMG_DIR = "extracted_images/theta6_bounce"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 46, 50), color="red");
In [76]:
IMG_DIR = "extracted_images/theta6_pass"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[400:, 800:], cmap="gray")
plt.plot(X, get_line(X, 46, 50), color="red");
In [ ]:
 
In [ ]:
IMG_DIR = "extracted_images/theta1_pass"
images = os.listdir(IMG_DIR)
sample_image_file = os.path.join(IMG_DIR, images[20])
sample_image = plt.imread(sample_image_file)

def get_line(X, theta, c):
    theta = np.deg2rad(theta)
    return np.tan(theta) * X + c

X = np.linspace(0, 400, 1000)

plt.imshow(sample_image[430:730, 600:1000], cmap="gray")
plt.plot(X, get_line(X, 20.5, 0), color="red");